var nav_b_a2_b22 = document.querySelectorAll('.nav_b_a2_b22');
console.log(nav_b_a2_b22.length);

for (var i = 0; i < 4; i++) {
    nav_b_a2_b22[i].style.background = "0 0/100% 100% url(s_images/header" + (i + 1) + ".jpg) no-repeat";
}